import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

public class Demo04 {
    public static void main(String[] args) {
        List<Integer> ages=new ArrayList<>();
        ages.add(5);
        ages.add(2);
        ages.add(4);
        ages.add(9);
        ages.add(8);
        ages.add(7);
        ages.add(1);
        Collections.addAll(ages,10,18,5);
        System.out.println(ages);
        System.out.println("====================");
        Collections.reverse(ages);
        System.out.println(ages);
        System.out.println("====================");
        Collections.shuffle(ages);
        System.out.println(ages);
        System.out.println("====================");
        Collections.sort(ages);
        System.out.println(ages);


    }
}
